﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

	<!--Header TopLogo-->
	<Style x:Key="HeaderLogoStyle" TargetType="TextBlock">
		<Setter Property="Foreground" Value="#FF555555"/>
		<Setter Property="FontWeight" Value="Bold"/>
		<Setter Property="FontSize" Value="20"/>
		<Setter Property="FontFamily" Value="Arial"/>
		<Setter Property="FontFamily" Value="Microsoft YaHei"/>
		<Setter Property="HorizontalAlignment" Value="Center"/>
		<Setter Property="VerticalAlignment" Value="Top"/>
		<Setter Property="TextAlignment" Value="Left"/>
		<Setter Property="Margin" Value="0,15,0,0"/>
		<Setter Property="TextWrapping" Value="Wrap"/>
		<Setter Property="TextTrimming" Value="WordEllipsis"/>
	</Style>

	<!--Header UserID-->
	<Style x:Key="HeaderUserIDStyle" TargetType="TextBlock">
		<Setter Property="Foreground" Value="#FF73A9D8"/>
		<Setter Property="FontSize" Value="11"/>
		<Setter Property="FontFamily" Value="Arial"/>
		<Setter Property="FontFamily" Value="Microsoft YaHei"/>
		<Setter Property="HorizontalAlignment" Value="Center"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="TextWrapping" Value="Wrap"/>
		<Setter Property="TextTrimming" Value="WordEllipsis"/>
	</Style>

	<!--User Sign-->
	<Style x:Key="HeaderSignStyle" TargetType="TextBox">
		<Setter Property="Background" Value="{x:Null}"/>
		<Setter Property="BorderBrush" Value="{x:Null}"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="MaxWidth" Value="250"/>
		<Setter Property="HorizontalAlignment" Value="Center"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="TextWrapping" Value="NoWrap"/>
	</Style>

	<!--Mail & Number-->
	<Style x:Key="TopMailBoxStyle" TargetType="HyperlinkButton">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="FontSize" Value="12"/>
		<Setter Property="FontFamily" Value="Arial"/>
		<Setter Property="FontFamily" Value="Microsoft YaHei"/>
		<Setter Property="Foreground" Value="#FFD1D1D1"/>
		<Setter Property="Cursor" Value="Hand"/>
		<Setter Property="Margin" Value="0,3,7,0"/>
		<Setter Property="Padding" Value="0"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="HyperlinkButton">
					<Border>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ColorAnimation To="#FF999999" Duration="0:0:0.5" Storyboard.TargetName="TextBrush1" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"/>
										<ColorAnimation To="#FF999999" Duration="0:0:0.5" Storyboard.TargetName="TextBrush2" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"/>
										<ColorAnimation To="#FF999999" Duration="0:0:0.5" Storyboard.TargetName="TextBrush3" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"/>
										<ColorAnimation To="#FF999999" Duration="0:0:0.5" Storyboard.TargetName="TextBrush4" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Normal">
									<Storyboard>
										<ColorAnimation To="#FFD1D1D1" Duration="0:0:0.5" Storyboard.TargetName="TextBrush1" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"/>
										<ColorAnimation To="#FFD1D1D1" Duration="0:0:0.5" Storyboard.TargetName="TextBrush2" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"/>
										<ColorAnimation To="#FFD1D1D1" Duration="0:0:0.5" Storyboard.TargetName="TextBrush3" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"/>
										<ColorAnimation To="#FFD1D1D1" Duration="0:0:0.5" Storyboard.TargetName="TextBrush4" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
							<TextBlock Name="TextBrush1" Text="{Binding Path=MailBox}"/>
							<TextBlock Name="TextBrush2" Text="（" FontSize="8" VerticalAlignment="Top"/>
							<TextBlock Name="TextBrush3" Text="{Binding Path=MBCount}" FontSize="8" VerticalAlignment="Top"/>
							<TextBlock Name="TextBrush4" Text="）" FontSize="8" VerticalAlignment="Top"/>
						</StackPanel>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--Settings-->
	<Style x:Key="TopSettingsStyle" TargetType="HyperlinkButton">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="FontSize" Value="12"/>
		<Setter Property="FontFamily" Value="Arial"/>
		<Setter Property="FontFamily" Value="Microsoft YaHei"/>
		<Setter Property="Foreground" Value="#FFD1D1D1"/>
		<Setter Property="Cursor" Value="Hand"/>
		<Setter Property="Margin" Value="0,3,9,0"/>
		<Setter Property="Padding" Value="0"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="HyperlinkButton">
					<Border>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ColorAnimation To="#FF999999" Duration="0:0:0.5" Storyboard.TargetName="TextBrush1" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Normal">
									<Storyboard>
										<ColorAnimation To="#FFD1D1D1" Duration="0:0:0.5" Storyboard.TargetName="TextBrush1" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<TextBlock x:Name="TextBrush1" Text="{Binding Path=Set}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!--/-->
	<Style x:Key="TopSettingCutStyle" TargetType="TextBlock">
		<Setter Property="Foreground" Value="#FFD1D1D1"/>
		<Setter Property="FontSize" Value="12"/>
		<Setter Property="FontFamily" Value="Arial"/>
		<Setter Property="FontFamily" Value="Microsoft YaHei"/>
		<Setter Property="Margin" Value="0,4,8,0"/>
	</Style>

	<!--Search-->
	<Style x:Key="TopSearchTBStyle" TargetType="TextBox">
		<Setter Property="Foreground" Value="#FFD1D1D1"/>
		<Setter Property="FontSize" Value="12"/>
		<Setter Property="FontFamily" Value="Arial"/>
		<Setter Property="FontFamily" Value="Microsoft YaHei"/>
		<Setter Property="BorderBrush" Value="#FFD1D1D1"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Height" Value="29"/>
		<Setter Property="TextWrapping" Value="NoWrap"/>
	</Style>
	<!--Search Border-->
	<Style x:Key="TopSearchBrStyle" TargetType="Border">
		<Setter Property="Background" Value="#FFB4B4B4"/>
		<Setter Property="BorderBrush" Value="#FFB4B4B4"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="CornerRadius" Value="0,4,4,0"/>
		<Setter Property="Height" Value="29"/>
		<Setter Property="Cursor" Value="Hand"/>
	</Style>
	<!--Search HyperlinkButton-->
	<Style x:Key="TopSearchHBStyle" TargetType="HyperlinkButton">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="BorderBrush" Value="{x:Null}"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="Width" Value="30"/>
		<Setter Property="Height" Value="29"/>
		<Setter Property="HorizontalAlignment" Value="Center"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="Padding" Value="0"/>
		<Setter Property="Cursor" Value="Hand"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="HyperlinkButton">
					<Grid>
						<ContentPresenter/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--Toolbar ListBoxItem Style-->
	<ControlTemplate x:Key="HeaderToolbarLBITemplate"  TargetType="ListBoxItem">
		<Border Background="Transparent" Margin="0,0,12,0">
			<VisualStateManager.VisualStateGroups>
				<VisualStateGroup x:Name="SelectionStates">
					<VisualState x:Name="Selected">
						<Storyboard>
							<ColorAnimation To="White" Duration="0:0:1" Storyboard.TargetName="Box1" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"/>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Unselected">
						<Storyboard>
							<ColorAnimation To="Transparent" Duration="0" Storyboard.TargetName="Box1" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"/>
						</Storyboard>
					</VisualState>
				</VisualStateGroup>
			</VisualStateManager.VisualStateGroups>
			<!-- ListboxItem Content -->
			<Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="1*"/>
					<ColumnDefinition Width="1"/>
					<ColumnDefinition Width="1*"/>
				</Grid.ColumnDefinitions>
				<Border>
					<Image Source="{Binding ReturnImage}"/>
				</Border>
				<Border x:Name="Box1" Grid.Column="2" Grid.Row="1" VerticalAlignment="Bottom" CornerRadius="4,4,0,0" Background="Transparent" Height="29"  Padding="16,3,16,0">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="1*"/>
							<ColumnDefinition Width="1*"/>
						</Grid.ColumnDefinitions>
						<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" Foreground="#FF555555" Text="{Binding Path=Title}" FontWeight="Bold" FontFamily="Arial" FontSize="13" TextAlignment="Center"/>
						<Border Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" CornerRadius="3" Background="#FFEEEEEE" Height="18" Padding="8,2" Margin="20,0,0,0">
							<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" Foreground="#FF555555" Text="{Binding Path=Count}" FontWeight="Bold" FontFamily="Arial" FontSize="11" TextAlignment="Center"/>
						</Border>
					</Grid>
				</Border>
			</Grid>
		</Border>
	</ControlTemplate>

</ResourceDictionary>



